#ifndef __MYSTDIO_H__ 
#define __MYSTDIO_H__


#define SIZE 1024
#define UMASK 0666


#define NO_BUFFER 1
#define ROW_BUFFER 2
#define FULL_BUFFER 4

#define NORMAL 0
#define FORCE 1

typedef struct MYFILE
{
  int fileno;
  int flag;
  int cur;
  int capacity;
  char out_buffer[SIZE];
}MYFILE;
MYFILE* myfopen(const char* filename,const char* mode);
void myfclose(MYFILE* fp);
int myfwrite(const void* ptr,int size,int n,MYFILE* fp);
void myfflush(MYFILE* fp);
#endif 
